﻿using com.iot.core.annotation;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Linq;

namespace com.iot.core.data.entity
{
    [Schema(Name = "机构表", Description = "")]     
    public class HtDept : BaseEntity, ISoftDeletedEntity
    {






        [Comment("父编号")]
        [Schema(Name = "父编号", Description = "1000研发后台 2000 单位平台 3000主管平台  4000厂家平台")]
        public long Pid { get; set; }


        [Comment("机构顶级编号")]
        [Schema(Name = "机构顶级编号", Description = "")]
        public long RootId { get; set; }


        [Comment("平台编号")]
        [Schema(Name = "平台编号", Description = "")]
        public long HtplatId { get; set; }


        [Comment("机构名称")]
        [Schema(Name = "机构名称", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(100)]
        public string Name { get; set; } = "";


        [Comment("区域编号")]
        [Schema(Name = "区域编号", Description = "")]
        public long HtareaId { get; set; }


        [Comment("地址")]
        [Schema(Name = "地址", Description = "")]
        [MaxLength(100)]
        public string Address { get; set; } = "";


        [Comment("联系人")]
        [Schema(Name = "联系人", Description = "")]
        [MaxLength(50)]
        public string Dutyperson { get; set; } = "";


        [Comment("联系电话")]
        [Schema(Name = "联系电话", Description = "")]
        [MaxLength(40)]
        public string Tel { get; set; } = "";


        [Comment("备注")]
        [Schema(Name = "备注", Description = "")]
        public string Memo { get; set; } = "";


        [Comment("照片")]
        [Schema(Name = "照片", Description = "")]
        public string Url { get; set; } = "";


        [Comment("状态")]
        [Schema(Name = "状态", Description = "启用、停用")]
        [MaxLength(10)]
        public string State { get; set; } = "";


        [Comment("经度")]
        [Schema(Name = "经度", Description = "")]
        public Decimal Lng { get; set; }


        [Comment("纬度")]
        [Schema(Name = "纬度", Description = "")]
        public Decimal Lat { get; set; }


        [Comment("创建日期")]
        [Schema(Name = "创建日期", Description = "")]
        public DateTime CrtDt { get; set; }


        [Comment("创建人编号")]
        [Schema(Name = "创建人编号", Description = "")]
        public long CrtUid { get; set; }


        [Comment("机构编号")]
        [Schema(Name = "机构编号", Description = "")]
        public long CrtDid { get; set; }


        [Comment("修改日期")]
        [Schema(Name = "修改日期", Description = "")]
        public DateTime EdtDt { get; set; }


        [Comment("修改人编号")]
        [Schema(Name = "修改人编号", Description = "")]
        public long EdtUid { get; set; }


        [Comment("Gid")]
        [Schema(Name = "Gid", Description = "")]
        public Guid Gid { get; set; }


        [Comment("删除标志")]
        [Schema(Name = "删除标志", Description = "")]
        public bool Deleted { get; set; }

    }
}
